﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace graduation_project.Voice_Recognition
{
    public partial class SelectSkinForm : Form
    {
        //ListViewItem var = new ListViewItem();
        SimulationMain skinMain = new SimulationMain();
        public static Image img = null;
        public SelectSkinForm()
        {
            InitializeComponent();
            
        }

        private void Skinpanel_Paint(object sender, PaintEventArgs e)
        {
            SkinListView.View = View.LargeIcon;
            SkinListView.LargeImageList = SkinImageList;
            
            SkinListView.BeginUpdate();
            for (int i = 0; i < SkinImageList.Images.Count; i++)
            {
                ListViewItem var = new ListViewItem();
                var.ImageIndex = i;
                var.Text = "皮肤" + i;
                SkinListView.Items.Add(var);
            }
            SkinListView.EndUpdate();
        }

        private void ConfirmSelectSkinbutton_Click(object sender, EventArgs e)
        {
            SkinMiddle skin = new SkinMiddle();
            int i = SkinListView.Items.IndexOf(SkinListView.FocusedItem);

            //MessageBox.Show("haode "+i);
            img = SkinImageList.Images[i%10];

            SkinMiddle.DoSendMessage();
           
            this.Close();
        }

    }

}
